class Player(object):
    # 类属性
    number = 0
    # 初始化函数（构造函数）
    def __init__(self, name, age, city):
        self.name = name
        self.age = age
        self.city = city
        Player.number += 1
    # 实例的方法
    def show(self):
        print("i'm the %d th player of this game, my name is %s, my age is %d, i come from %s" %(Player.number, self.name, self.age, self.city))

tom = Player('tom', 29, 'LA.')
tom.show()